-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): right menu -> middle menu (#18)
- Loading branch information
Showing
8 changed files
with
55 additions
and
36 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
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
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
2 changes: 1 addition & 1 deletion
2
...modules/scenarios/components/execution/history/scenario-executions-history.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
56 changes: 28 additions & 28 deletions
56
chutney/ui/src/app/shared/components/layout/right-menu/chutney-right-menu.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,31 +1,31 @@ | ||
<nav class="navbar px-1 bg-light h-100 align-items-start" *ngIf="menuItems?.length"> | ||
<div class="container-fluid"> | ||
<ul class="navbar-nav me-auto mb-2"> | ||
<ng-container *ngFor="let item of menuItems" | ||
[ngTemplateOutlet]="!!item.options && item.options.length > 1 ? dropDownItem : simpleItem" | ||
[ngTemplateOutletContext]="{item:item}"> | ||
</ng-container> | ||
</ul> | ||
<div class="middle-sidebar chutney-nav-menu d-flex justify-content-center sticky-top"> | ||
<div class="nav"> | ||
<ng-container *ngIf="menuItems?.length"> | ||
<ng-container *ngFor="let item of menuItems" | ||
[ngTemplateOutlet]="!!item.options && item.options.length > 1 ? dropDownItem : simpleItem" | ||
[ngTemplateOutletContext]="{item:item}"> | ||
</ng-container> | ||
</ng-container> | ||
</div> | ||
</nav> | ||
<ng-template #dropDownItem let-item='item'> | ||
<li class="nav-item" ngbDropdown display="dynamic" *hasAuthorization="item.authorizations || []"> | ||
<a class="nav-link" tabindex="0" ngbDropdownToggle id="executeDropdown" role="button"> | ||
<i [ngClass]="item.iconClass"></i> | ||
{{item.label | translate}} | ||
</a> | ||
<div ngbDropdownMenu aria-labelledby="executeDropdown" class="dropdown-menu"> | ||
<a class="cursor-pointer" ngbDropdownItem *ngFor="let option of item.options" | ||
(click)="item.click(option.id)">{{ option.label }}</a> | ||
|
||
<ng-template #dropDownItem let-item='item'> | ||
<div class="nav-item" placement="bottom" ngbDropdown display="dynamic" *hasAuthorization="item.authorizations || []"> | ||
<a class="nav-link" tabindex="0" ngbDropdownToggle id="executeDropdown" role="button"> | ||
<i [ngClass]="item.iconClass"></i> | ||
</a> | ||
<div ngbDropdownMenu aria-labelledby="executeDropdown" class="dropdown-menu"> | ||
<a class="cursor-pointer" ngbDropdownItem *ngFor="let option of item.options" | ||
(click)="item.click(option.id)">{{ option.label }}</a> | ||
</div> | ||
</div> | ||
</ng-template> | ||
</ng-template> | ||
|
||
<ng-template #simpleItem let-item='item'> | ||
<li class="nav-item" *hasAuthorization="item.authorizations || []"> | ||
<a class="nav-link cursor-pointer" role="nav-link" | ||
[routerLink]="getItemLink(item)" | ||
(click)="onItemClick(item)"> | ||
<i [ngClass]="item.iconClass"></i> | ||
{{item.label | translate}}</a> | ||
</li> | ||
</ng-template> | ||
<ng-template #simpleItem let-item='item'> | ||
<div class="nav-item" placement="bottom" ngbTooltip="{{item.label | translate}}" *hasAuthorization="item.authorizations || []"> | ||
<a class="nav-link cursor-pointer" role="nav-link" [routerLink]="getItemLink(item)" | ||
(click)="onItemClick(item)"> | ||
<i [ngClass]="item.iconClass"></i> | ||
</a> | ||
</div> | ||
</ng-template> | ||
</div> |
11 changes: 11 additions & 0 deletions
11
chutney/ui/src/app/shared/components/layout/right-menu/chutney-right-menu.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,7 +1,18 @@ | ||
@import "~bootswatch/dist/flatly/variables"; | ||
|
||
.nav-item { | ||
white-space: nowrap; | ||
} | ||
|
||
.nav-link:hover { | ||
color: var(--bs-primary)!important; | ||
} | ||
|
||
.chutney-nav-menu { | ||
margin-left: calc(var(--bs-gutter-x)* -0.5); | ||
margin-right: calc(var(--bs-gutter-x)* -0.5); | ||
margin-top: -1.5rem; | ||
|
||
top: -1.5rem; | ||
z-index: 2000; | ||
} |
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
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