From 70ae1b033a97f5c47463492e6868c66cee3b3a68 Mon Sep 17 00:00:00 2001 From: simon louvet Date: Sat, 17 Nov 2018 12:08:47 +0100 Subject: [PATCH] ui : templating and config update --- src/config.integration.pug | 4 ++++ src/config.local.pug | 4 ++++ src/config.sample.pug | 2 +- src/index.pug | 4 ++-- src/menu.pug | 22 ++++++++++++---------- src/styles/menu.scss | 20 ++++++++++++++------ 6 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 src/config.integration.pug create mode 100644 src/config.local.pug diff --git a/src/config.integration.pug b/src/config.integration.pug new file mode 100644 index 0000000..02c5b80 --- /dev/null +++ b/src/config.integration.pug @@ -0,0 +1,4 @@ +- var sdn = process.env.SDN || 'staging-app.happy-dev.fr' +- var cdn = process.env.CDN || 'staging-app.happy-dev.fr' +- var xmpp = 'https://jabber.happy-dev.fr/http-bind/' +- var client_id = 833925 diff --git a/src/config.local.pug b/src/config.local.pug new file mode 100644 index 0000000..4ab4c7b --- /dev/null +++ b/src/config.local.pug @@ -0,0 +1,4 @@ +- var sdn = process.env.SDN || 'http://127.0.0.1:8000' +- var cdn = process.env.CDN || 'staging-app.happy-dev.fr' +- var xmpp = 'https://jabber.happy-dev.fr/http-bind/' +- var client_id = 863031 diff --git a/src/config.sample.pug b/src/config.sample.pug index 9ec8b2a..3afab8b 100644 --- a/src/config.sample.pug +++ b/src/config.sample.pug @@ -1,4 +1,4 @@ - var sdn = process.env.SDN || 'http://127.0.0.1:8000' - var cdn = process.env.CDN || 'https://cdn.happy-dev.fr' - var xmpp = 'https://jabber.happy-dev.fr/http-bind/' -- var client_id = '863031' +- var client_id = '833925' diff --git a/src/index.pug b/src/index.pug index 06ca528..afc83ff 100644 --- a/src/index.pug +++ b/src/index.pug @@ -8,8 +8,8 @@ html(lang="en") meta(http-equiv="X-UA-Compatible", content="ie=edge") link(rel="icon" type="image/png" href="/images/logo.png") include dependencies.pug - div.layer - body + body + div.layer header#header include header.pug #subContainer diff --git a/src/menu.pug b/src/menu.pug index c3e3907..070d94f 100644 --- a/src/menu.pug +++ b/src/menu.pug @@ -18,19 +18,21 @@ nav#navbar div.menu-label Projects div.menu-icon.icon-folder-alt sib-route(hidden,name='project', id-prefix=`${sdn}/projects/`) - sib-display( - data-src=`${sdn}/projects/`, - data-fields='name', - next='project' - ) + div.sub-menu + sib-display( + data-src=`${sdn}/projects/`, + data-fields='name', + next='project' + ) div div.menu div.menu-notification div.menu-label Groups div.menu-icon.icon-bubbles sib-route(hidden, name='group', id-prefix=`${sdn}/channels/`) - sib-display( - data-src=`${sdn}/channels/`, - data-fields='name', - next='group' - ) + div.sub-menu + sib-display( + data-src=`${sdn}/channels/`, + data-fields='name', + next='group' + ) diff --git a/src/styles/menu.scss b/src/styles/menu.scss index c8193a4..af9ad2d 100644 --- a/src/styles/menu.scss +++ b/src/styles/menu.scss @@ -28,7 +28,7 @@ #navbar { //transform: translateX(-120%); transition: flex-basis 0.5s ease-in-out; - flex-basis: 0px; + flex-basis: 0; //position: absolute; //top: auto; //display: none; @@ -40,6 +40,13 @@ sib-router { display: flex; flex-direction: column; + .sub-menu { + padding-left: 2em; + div{ + padding-bottom: 1em; + } + } + .menu { display: flex; flex-direction: row-reverse; @@ -61,7 +68,8 @@ sib-router { color: $color-yellow-light; // transform: perspective(1000px) translateZ(1px) scale(0.8); } - .menu-notification>div{ + + .menu-notification > div { background-color: $color-purple-dark; color: $color-yellow-light; } @@ -69,7 +77,7 @@ sib-router { .menu-icon { //flex-basis: 2em; - width :4em; + width: 4em; flex-shrink: 0; flex-grow: 0; justify-content: center; @@ -77,7 +85,6 @@ sib-router { display: flex; flex-direction: column; - &:before { width: 1.9em; height: 1.9em; @@ -110,8 +117,9 @@ sib-router { flex-direction: column; justify-content: center; align-items: center; - >div{ - color : $color-black; + + > div { + color: $color-black; display: flex; justify-content: center; align-items: center;