update: left-menu - responsive ok

This commit is contained in:
gaelle morin 2020-06-04 18:15:43 +02:00
parent 9d83093165
commit 8f49cbdcd7
No known key found for this signature in database
GPG Key ID: 028426702B95CF9C
3 changed files with 110 additions and 99 deletions

View File

@ -100,7 +100,7 @@ sib-router#navbar-router(default-route='dashboard')
div.menu-icon.icon-folder-alt div.menu-icon.icon-folder-alt
sib-route(name='circle', rdf-type='hd:circle', use-id='', hidden) sib-route(name='circle', rdf-type='hd:circle', use-id='', hidden)
div.sub-menu.menu-notification div.sub-menu.menu-notification
sib-display( sib-display.circle-tab(
bind-user bind-user
nested-field='circles' nested-field='circles'
fields='circle' fields='circle'
@ -120,7 +120,7 @@ sib-router#navbar-router(default-route='dashboard')
div.menu-icon.icon-envelope-letter div.menu-icon.icon-envelope-letter
sib-route(name='messages', rdf-type='foaf:user', use-id='', hidden) sib-route(name='messages', rdf-type='foaf:user', use-id='', hidden)
div.sub-menu.menu-notification div.sub-menu.menu-notification
sib-display.nosub( sib-display.nosub.message-tab(
data-src=`${endpoints.users || (endpoints.get && endpoints.get.users)}` data-src=`${endpoints.users || (endpoints.get && endpoints.get.users)}`
fields='name, chatProfile.jabberID, badge' fields='name, chatProfile.jabberID, badge'
search-fields="name" search-fields="name"

View File

@ -12,12 +12,12 @@
} }
sib-router { sib-router {
.menu-wrapper { .menu-wrapper {
&.is-closed { &.is-closed {
.sub-menu { .sub-menu {
display: none; display: none;
} }
.menu-chevron { .menu-chevron {
transform: rotate(180deg); transform: rotate(180deg);
} }
@ -92,48 +92,74 @@
.sub-menu { .sub-menu {
/* Specific styles for the "Projects" tab */ /* Ellipsis for project tab */
.project-tab>div>sib-display>div:nth-child(1) { .project-tab>div>sib-display>div:nth-child(1) {
sib-set-default[name='project'] { sib-set-default[name='project'] {
flex: 3;
.project-customer,
.project-name {
box-sizing: border-box;
display: block;
width: calc(80vw - 76px); /*76px = padding of the element + width and margin of counter */
@include breakpoint(lg) {
width: 150px;
}
}
.project-customer, .project-customer,
.project-name>div { .project-name>div {
@include breakpoint(lg) {
display: block; display: block;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
}
}
}
.project-customer { /* Ellipsis for circle tab */
width: 100%;
.circle-tab>div>sib-display>div {
sib-display-div[name='name'] {
flex: 3;
>div[name='name'] {
box-sizing: border-box;
padding-left: 0.2em;
width: calc(80vw - 76px); /*76px = padding of the element + width and margin of counter */
@include breakpoint(lg) {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 150px;
}
}
}
}
/* Ellipsis for message tab */
.message-tab>div>sib-display>div>sib-display-div>div {
box-sizing: border-box;
width: calc(80vw - 76px); /*76px = padding of the element + width and margin of counter */
@include breakpoint(lg) { @include breakpoint(lg) {
width: 150px; width: 150px;
} }
} }
.project-name {
display: block;
width: calc(80vw - 50px);
@include breakpoint(lg) {
width: 150px;
}
}
}
hubl-counter {
margin-top: 16px;
}
}
/* End of specific styles of "Projects" tab */
sib-display.nosub>sib-form[fields="name"]>hubl-search-users>input { sib-display.nosub>sib-form[fields="name"]>hubl-search-users>input {
margin-left: 30px; margin-left: 30px;
max-width: 87%; max-width: 82%;
width: 87%; width: 82%;
display: block; display: block;
background-color: var(--color-secondary); background-color: var(--color-secondary);
color: var(--color-grey-6); color: var(--color-grey-6);
@ -153,15 +179,19 @@
display: grid; display: grid;
grid-template-columns: auto 50% auto; grid-template-columns: auto 50% auto;
grid-template-areas: "left middle right"; grid-template-areas: "left middle right";
>* { >* {
color: var(--color-grey-6); color: var(--color-grey-6);
} }
>[data-id="prev"] { >[data-id="prev"] {
grid-area: left; grid-area: left;
} }
>[data-id="next"] { >[data-id="next"] {
grid-area: right; grid-area: right;
} }
>span { >span {
grid-area: middle; grid-area: middle;
} }
@ -170,6 +200,7 @@
hubl-menu-publicprivate { hubl-menu-publicprivate {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
div { div {
font-family: simple-line-icons; font-family: simple-line-icons;
width: 20px; width: 20px;
@ -190,7 +221,6 @@
} }
&>sib-display { &>sib-display {
&:last-child>div { &:last-child>div {
margin-bottom: 2.2rem; margin-bottom: 2.2rem;
} }
@ -198,6 +228,7 @@
>div { >div {
color: var(--color-grey-6); color: var(--color-grey-6);
cursor: pointer; cursor: pointer;
>hubl-menu-fix-url-circle>sib-display>div, >hubl-menu-fix-url-circle>sib-display>div,
>hubl-menu-fix-url-project>sib-display>div { >hubl-menu-fix-url-project>sib-display>div {
padding: 1rem 1rem 1rem 3rem; padding: 1rem 1rem 1rem 3rem;
@ -219,25 +250,25 @@
} }
&.menu-notification { &.menu-notification {
>sib-display>div>sib-display>div>hubl-menu-fix-url-circle, >sib-display>div>sib-display>div>hubl-menu-fix-url-circle,
>sib-display>div>sib-display>div>hubl-menu-fix-url-project { >sib-display>div>sib-display>div>hubl-menu-fix-url-project {
flex: 1; flex: 1;
} }
>sib-display>div>sib-display>div, >sib-display>div>sib-display>div,
>sib-display>div>sib-display>div>hubl-menu-fix-url-circle>sib-display>div, >sib-display>div>sib-display>div>hubl-menu-fix-url-circle>sib-display>div,
>sib-display>div>sib-display>div>hubl-menu-fix-url-project>sib-display>div { >sib-display>div>sib-display>div>hubl-menu-fix-url-project>sib-display>div {
display: flex; display: flex;
sib-display-div { justify-content: space-between;
flex: 3; }
@include breakpoint(lg) {
max-width: 150px;
}
}
hubl-counter { hubl-counter {
background-color: turquoise;
height: 20px; height: 20px;
width: 20px; width: 20px;
margin-right: 1em; margin-right: 1em;
div.counter:not([data-nb-unread="0"]) { div.counter:not([data-nb-unread="0"]) {
text-align: center; text-align: center;
display: block; display: block;
@ -251,20 +282,6 @@
color: var(--color-secondary); color: var(--color-secondary);
} }
} }
sib-display-div {
@include breakpoint(lg) {
max-width: 150px;
>div[name='name'] {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}
} }
} }
@ -278,9 +295,7 @@
/* Styles for hovering (only on large screens) */ /* Styles for hovering (only on large screens) */
#main__menu sib-router .sub-menu.menu-notification>sib-display>div>sib-display>div>hubl-menu-fix-url-project>sib-display>div:hover, #main__menu sib-router .sub-menu.menu-notification>sib-display>div>sib-display>div>hubl-menu-fix-url-project>sib-display>div:hover,
#main__menu sib-router .sub-menu.menu-notification>sib-display>div>sib-display>div>hubl-menu-fix-url-circle>sib-display>div:hover, #main__menu sib-router .sub-menu.menu-notification>sib-display>div>sib-display>div>hubl-menu-fix-url-circle>sib-display>div:hover {
#main__menu sib-router .sub-menu.menu-notification>sib-display.nosub>div>sib-display>div:hover {
@include breakpoint(lg) { @include breakpoint(lg) {
background-color: var(--color-secondary); background-color: var(--color-secondary);
color: var(--color-white); color: var(--color-white);
@ -291,7 +306,6 @@
box-sizing: border-box; box-sizing: border-box;
font-weight: normal; font-weight: normal;
>hubl-menu-publicprivate { >hubl-menu-publicprivate {
display: none; display: none;
} }
@ -302,14 +316,15 @@
/* Hover for projects */ /* Hover for projects */
>sib-set-default[name='project']>.project-customer { >sib-set-default[name='project']>.project-customer {
width: 250px;
white-space: break-spaces;
text-align: left;
font-weight: normal; font-weight: normal;
padding-left: 1rem;
text-align: left;
width: 150px;
white-space: break-spaces;
} }
sib-set-default[name='project']>.project-name { sib-set-default[name='project']>.project-name {
padding-left: 0; padding-left: 1rem;
width: 100%; width: 100%;
&>div { &>div {
@ -320,14 +335,10 @@
/* Hover for circles */ /* Hover for circles */
>sib-display-div[name="name"] { >sib-display-div[name="name"] {
padding-left: 0;
width: 100%; width: 100%;
}
/* Hover for private messages */ &>div {
sib-display-div { padding-left: 1rem;
>div[name="name"] {
white-space: normal; white-space: normal;
} }
} }

0
src/styles/base/new.scss Normal file
View File