-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(admin-ui): New app layout with updated nav menu
Relates to #1645
- Loading branch information
1 parent
6e7e15e
commit e6f8584
Showing
46 changed files
with
1,574 additions
and
622 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 39 additions & 17 deletions
56
packages/admin-ui/src/lib/core/src/components/app-shell/app-shell.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,44 @@ | ||
<clr-main-container> | ||
<clr-header> | ||
<div class="branding"> | ||
<a [routerLink]="['/']"><img src="assets/logo-75px.png" class="logo" /><span class="wordmark" *ngIf="!hideVendureBranding">vendure</span></a> | ||
<div class="app-container"> | ||
<div class="left-nav"> | ||
<div class="branding py-2"> | ||
<a [routerLink]="['/']" | ||
><img src="assets/logo-75px.png" class="logo" /><span | ||
class="wordmark md:hidden" | ||
*ngIf="!hideVendureBranding" | ||
>vendure</span | ||
></a | ||
> | ||
</div> | ||
<div class="header-nav"></div> | ||
<div class="header-actions"> | ||
<div class="mx-2"> | ||
<vdr-channel-switcher *vdrIfMultichannel></vdr-channel-switcher> | ||
<vdr-user-menu [userName]="userName$ | async" | ||
[uiLanguageAndLocale]="uiLanguageAndLocale$ | async" | ||
[availableLanguages]="availableLanguages" | ||
(selectUiLanguage)="selectUiLanguage()" | ||
(logOut)="logOut()"></vdr-user-menu> | ||
</div> | ||
</clr-header> | ||
<nav class="subnav"><vdr-breadcrumb></vdr-breadcrumb></nav> | ||
<div class="px-2 main-nav-container"> | ||
<vdr-main-nav></vdr-main-nav> | ||
</div> | ||
<div class="m-2"> | ||
<vdr-settings-nav></vdr-settings-nav> | ||
</div> | ||
<div class="mx-2"></div> | ||
</div> | ||
|
||
<div class="content-container"> | ||
<div class="content-area"><router-outlet></router-outlet></div> | ||
<vdr-main-nav></vdr-main-nav> | ||
<div class="surface"> | ||
<div class="content-container"> | ||
<div class="top-bar"> | ||
<div></div> | ||
<div class="universal-search flex-spacer"></div> | ||
<div> | ||
<vdr-user-menu | ||
[userName]="userName$ | async" | ||
[uiLanguageAndLocale]="uiLanguageAndLocale$ | async" | ||
[availableLanguages]="availableLanguages" | ||
(selectUiLanguage)="selectUiLanguage()" | ||
(logOut)="logOut()" | ||
></vdr-user-menu> | ||
</div> | ||
</div> | ||
<vdr-breadcrumb></vdr-breadcrumb> | ||
<vdr-page-title [value]="(pageTitle$ | async) || '' | translate"></vdr-page-title> | ||
<div class="content-area"><router-outlet></router-outlet></div> | ||
</div> | ||
</div> | ||
</clr-main-container> | ||
</div> |
94 changes: 89 additions & 5 deletions
94
packages/admin-ui/src/lib/core/src/components/app-shell/app-shell.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,115 @@ | ||
@import "variables"; | ||
@import 'variables'; | ||
|
||
.app-container { | ||
display: flex; | ||
height: 100vh; | ||
overflow: hidden; | ||
} | ||
|
||
.left-nav { | ||
background-color: var(--color-left-nav-bg); | ||
color: var(--color-left-nav-text); | ||
display: flex; | ||
flex-direction: column; | ||
height: 100%; | ||
box-shadow: -3px 1px 10px 0px rgb(0 0 0 / 18%); | ||
z-index: 1; | ||
} | ||
|
||
.top-bar { | ||
height: 48px; | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
background-color: var(--color-top-bar-bg); | ||
border-bottom: 1px solid var(--color-component-border-200); | ||
} | ||
|
||
.main-nav-container { | ||
overflow: auto; | ||
flex: 1; | ||
/* ===== Scrollbar CSS ===== */ | ||
/* Firefox */ | ||
scrollbar-width: auto; | ||
scrollbar-color: var(--color-primary-700) #052731; | ||
|
||
/* Chrome, Edge, and Safari */ | ||
&::-webkit-scrollbar { | ||
width: 16px; | ||
} | ||
|
||
&::-webkit-scrollbar-track { | ||
background-color: #052731; | ||
} | ||
|
||
&::-webkit-scrollbar-thumb { | ||
background-color: var(--color-primary-700); | ||
border-radius: var(--border-radius); | ||
&:hover { | ||
background-color: #0f5070; | ||
} | ||
} | ||
} | ||
|
||
.surface { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
background-color: var(--color-component-bg-100); | ||
} | ||
|
||
.content-container { | ||
overflow: auto; | ||
} | ||
|
||
.branding { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
min-width: 0; | ||
} | ||
|
||
.logo { | ||
width: 40px; | ||
} | ||
|
||
.wordmark { | ||
font-weight: bold; | ||
margin-left: 12px; | ||
font-size: 24px; | ||
color: var(--color-primary-500); | ||
@media screen and (max-width: $breakpoint-medium) { | ||
display: none; | ||
} | ||
} | ||
vdr-breadcrumb { | ||
@media screen and (min-width: $breakpoint-small){ | ||
margin-left: $clr-sidenav-width; | ||
} | ||
width: 100%; | ||
max-width: var(--layout-content-max-width); | ||
background-color: var(--color-component-bg-100); | ||
padding: var(--space-unit) 0; | ||
z-index: 5; | ||
margin: 0 auto; | ||
position: sticky; | ||
top: 0; | ||
} | ||
|
||
.header-actions { | ||
align-items: center; | ||
} | ||
|
||
.content-area { | ||
position: relative; | ||
max-width: var(--layout-content-max-width); | ||
margin: 0 auto; | ||
padding: 0 var(--space-unit); | ||
} | ||
|
||
::ng-deep { | ||
.header { | ||
background-image: linear-gradient(to right, var(--color-header-gradient-from), var(--color-header-gradient-to)); | ||
background-image: linear-gradient( | ||
to right, | ||
var(--color-header-gradient-from), | ||
var(--color-header-gradient-to) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.