Skip to content
Snippets Groups Projects
Commit f8728187 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

style: add max with content to avoid bad display on huge screen

parent 9851abea
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,9 @@ ...@@ -38,7 +38,9 @@
> >
</dlcm-main-toolbar-mobile> </dlcm-main-toolbar-mobile>
</div> </div>
<div class="body"> <div class="body"
[class.ignore-grid]="ignoreGrid"
>
<div class="instance-logo-wrapper" <div class="instance-logo-wrapper"
(click)="navigateToHome()" (click)="navigateToHome()"
> >
...@@ -48,12 +50,18 @@ ...@@ -48,12 +50,18 @@
> >
</div> </div>
<dlcm-shared-breadcrumb (navigateChange)="navigate($event)"></dlcm-shared-breadcrumb> <div class="breadcrumb-wrapper">
<dlcm-shared-breadcrumb class="breadcrumb"
(navigateChange)="navigate($event)"
></dlcm-shared-breadcrumb>
</div>
<main class="content mat-typography" <main class="content mat-typography"
[dlcmSpinner]="!(isApplicationInitializedObs | async)" [dlcmSpinner]="!(isApplicationInitializedObs | async)"
> >
<router-outlet></router-outlet> <div class="router-outlet-wrapper">
<router-outlet></router-outlet>
</div>
</main> </main>
<dlcm-footer [updateVersion]="appStatusService.updateAvailable | async" <dlcm-footer [updateVersion]="appStatusService.updateAvailable | async"
......
...@@ -44,6 +44,31 @@ dlcm-main-toolbar-desktop-vertical { ...@@ -44,6 +44,31 @@ dlcm-main-toolbar-desktop-vertical {
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
&.ignore-grid {
.breadcrumb-wrapper {
.breadcrumb {
max-width: initial;
}
}
.content {
.router-outlet-wrapper {
max-width: initial;
}
}
}
}
.breadcrumb-wrapper {
background-color: $background-grey;
display: flex;
justify-content: center;
.breadcrumb {
max-width: $grid-width;
width: 100%;
}
} }
.content { .content {
...@@ -51,6 +76,12 @@ dlcm-main-toolbar-desktop-vertical { ...@@ -51,6 +76,12 @@ dlcm-main-toolbar-desktop-vertical {
display: flex; display: flex;
overflow-y: auto; overflow-y: auto;
justify-content: center; justify-content: center;
.router-outlet-wrapper {
display: flex;
flex: 1;
max-width: $grid-width;
}
} }
// Display toolbar on left for dlcm theme on desktop only // Display toolbar on left for dlcm theme on desktop only
......
...@@ -59,6 +59,7 @@ export class AppComponent extends SharedAbstractPresentational { ...@@ -59,6 +59,7 @@ export class AppComponent extends SharedAbstractPresentational {
@Select((state: LocalStateModel) => state.application.theme) themeObs: Observable<ThemeEnum>; @Select((state: LocalStateModel) => state.application.theme) themeObs: Observable<ThemeEnum>;
@Select((state: LocalStateModel) => state.application.userRoles) userRolesObs: Observable<ApplicationRoleEnum[]>; @Select((state: LocalStateModel) => state.application.userRoles) userRolesObs: Observable<ApplicationRoleEnum[]>;
@Select((state: LocalStateModel) => state.application.application_user.current) currentUserObs: Observable<UserExtended>; @Select((state: LocalStateModel) => state.application.application_user.current) currentUserObs: Observable<UserExtended>;
ignoreGrid: boolean = false;
@HostListener("window:beforeunload", ["$event"]) @HostListener("window:beforeunload", ["$event"])
leaveWithoutSaveNotification($event: Event): void { leaveWithoutSaveNotification($event: Event): void {
...@@ -137,10 +138,15 @@ export class AppComponent extends SharedAbstractPresentational { ...@@ -137,10 +138,15 @@ export class AppComponent extends SharedAbstractPresentational {
this.subscribe(this.urlStateObs this.subscribe(this.urlStateObs
.pipe( .pipe(
tap(urlState => { tap(urlState => {
this.ignoreGrid = false;
if (urlState) { if (urlState) {
const url = urlState.url; const url = urlState.url;
if (url.startsWith(urlSeparator + RoutesEnum.homePage)) { if (url.startsWith(urlSeparator + RoutesEnum.homePage)) {
this.currentModule = RoutesEnum.homePage; this.currentModule = RoutesEnum.homePage;
if (url.startsWith(urlSeparator + RoutesEnum.homePageBrowsing)) {
this.ignoreGrid = true;
}
return; return;
} }
......
...@@ -2,54 +2,59 @@ ...@@ -2,54 +2,59 @@
$padding-bottom-desktop: 20px; $padding-bottom-desktop: 20px;
.line { :host {
display: flex; display: block;
flex-direction: row; padding-bottom: 25px;
overflow: hidden;
.line {
@include respond-to-breakpoint('xs') { display: flex;
flex-direction: column; flex-direction: row;
overflow: hidden;
@include respond-to-breakpoint('xs') {
flex-direction: column;
}
} }
}
dt { dt {
font-weight: bold; font-weight: bold;
width: 160px; width: 160px;
clear: left; clear: left;
text-align: left; text-align: left;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@include respond-to-breakpoint-and-bigger('sm') { @include respond-to-breakpoint-and-bigger('sm') {
padding-bottom: $padding-bottom-desktop; padding-bottom: $padding-bottom-desktop;
}
} }
}
dd { dd {
margin-left: 0; margin-left: 0;
padding-bottom: 10px; padding-bottom: 10px;
word-break: break-word; word-break: break-word;
@include respond-to-smaller-than-breakpoint('sm') { @include respond-to-smaller-than-breakpoint('sm') {
width: 100%; width: 100%;
}
} }
}
.pre { .pre {
font-size: 13px; font-size: 13px;
line-height: 1.42857143; line-height: 1.42857143;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
background-color: #f5f5f5; background-color: #f5f5f5;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 4px; border-radius: 4px;
overflow-x: auto; overflow-x: auto;
} }
.code { .code {
font-family: monospace; font-family: monospace;
white-space: pre-line; white-space: pre-line;
padding-top: 0; padding-top: 0;
}
} }
@import "../../../../../sass/abstracts/variables"; @import "../../../../../sass/abstracts/variables";
.breadcrumb { :host {
padding: 10px 25px; display: block;
margin: 0;
list-style: none !important;
list-style-type: none;
background-color: $background-grey;
}
li {
display: inline;
font-size: 14px;
}
li + li:before { .breadcrumb {
padding: 8px; padding: 10px 25px;
line-height: 30px; line-height: 30px;
color: $dark-grey;
content: "/";
}
a { li {
&.current { display: inline;
text-decoration: none; font-size: 14px;
cursor: initial; }
&:hover { li + li:before {
color: $primary-color; padding: 0 8px;
color: $dark-grey;
content: "/";
} }
&:hover:before { a {
visibility: hidden; &.current {
text-decoration: none;
cursor: initial;
&:hover {
color: $primary-color;
}
&:hover:before {
visibility: hidden;
}
}
} }
} }
} }
...@@ -4,6 +4,8 @@ $primary-color-darker: var(--primary-color-darker); ...@@ -4,6 +4,8 @@ $primary-color-darker: var(--primary-color-darker);
$accent-color: var(--accent-color); $accent-color: var(--accent-color);
$text-color: #292F33; $text-color: #292F33;
$grid-width: 1400px;
$red: #f44336; $red: #f44336;
$green: #01b500; $green: #01b500;
$background-grey: #f5f5f5; $background-grey: #f5f5f5;
......
...@@ -110,7 +110,7 @@ ul { ...@@ -110,7 +110,7 @@ ul {
} }
} }
ul, li { ul, ol, li {
padding: 0; padding: 0;
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment