-
Notifications
You must be signed in to change notification settings - Fork 1
New Headers Implementation #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c279064
Edited headers as per the new design
04e8169
Removed unused console logs
18feec9
Added Fullscreen mode to samples
e81dc9d
Adding missing styles for hiding parts of the header on fullscreen
3ace1e5
Removed code repetition, improved styles, ssr compatibility changes
f1a50a8
Cleaning up DOM event listeners
ee1ea7c
Resolving pipeline errors
ff28bde
Adding missing icons file
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,42 +1,160 @@ | ||
| <div class="demo-container"> | ||
| <div class="tab-container "> | ||
| <div class="tab-item-container" routerLink="inventory" routerLinkActive #tab1="routerLinkActive" > | ||
| <ng-container [ngTemplateOutlet]="tabItemTemplate" [ngTemplateOutletContext]="{ enabled: tab1.isActive, tabName: 'inventory' }"></ng-container> | ||
| <div class="demo-container" #fullscreenElement [class.is-fullscreen]="isFullscreen"> | ||
| <div class="tabs-info-wrapper-element"> | ||
| <div class="tab-container" [class.hidden]="isFullscreen"> | ||
| <div | ||
| class="tab-item-container" | ||
| routerLink="inventory" | ||
| routerLinkActive | ||
| #tab1="routerLinkActive" | ||
| > | ||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemTemplate" | ||
| [ngTemplateOutletContext]="{ | ||
| enabled: tab1.isActive, | ||
| tabName: 'inventory' | ||
| }" | ||
| ></ng-container> | ||
| </div> | ||
| <div | ||
| class="tab-item-container" | ||
| routerLink="hr-portal" | ||
| routerLinkActive | ||
| #tab2="routerLinkActive" | ||
| > | ||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemTemplate" | ||
| [ngTemplateOutletContext]="{ | ||
| enabled: tab2.isActive, | ||
| tabName: 'hr-portal' | ||
| }" | ||
| ></ng-container> | ||
| </div> | ||
| <div | ||
| class="tab-item-container" | ||
| routerLink="finance" | ||
| routerLinkActive | ||
| #tab3="routerLinkActive" | ||
| > | ||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemTemplate" | ||
| [ngTemplateOutletContext]="{ | ||
| enabled: tab3.isActive, | ||
| tabName: 'finance' | ||
| }" | ||
| ></ng-container> | ||
| </div> | ||
| <div | ||
| class="tab-item-container" | ||
| routerLink="sales" | ||
| routerLinkActive | ||
| #tab4="routerLinkActive" | ||
| > | ||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemTemplate" | ||
| [ngTemplateOutletContext]="{ | ||
| enabled: tab4.isActive, | ||
| tabName: 'sales' | ||
| }" | ||
| ></ng-container> | ||
| </div> | ||
| <div | ||
| class="tab-item-container" | ||
| routerLink="fleet" | ||
| routerLinkActive | ||
| #tab5="routerLinkActive" | ||
| > | ||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemTemplate" | ||
| [ngTemplateOutletContext]="{ | ||
| enabled: tab5.isActive, | ||
| tabName: 'fleet' | ||
| }" | ||
| ></ng-container> | ||
| </div> | ||
| </div> | ||
| <div class="tab-item-container" routerLink="hr-portal" routerLinkActive #tab2="routerLinkActive" > | ||
| <ng-container [ngTemplateOutlet]="tabItemTemplate" [ngTemplateOutletContext]="{ enabled: tab2.isActive, tabName: 'hr-portal' }"></ng-container> | ||
| </div> | ||
| <div class="tab-item-container" routerLink="finance" routerLinkActive #tab3="routerLinkActive" > | ||
| <ng-container [ngTemplateOutlet]="tabItemTemplate" [ngTemplateOutletContext]="{ enabled: tab3.isActive, tabName: 'finance' }"></ng-container> | ||
| </div> | ||
| <div class="tab-item-container" routerLink="sales" routerLinkActive #tab4="routerLinkActive" > | ||
| <ng-container [ngTemplateOutlet]="tabItemTemplate" [ngTemplateOutletContext]="{ enabled: tab4.isActive, tabName: 'sales' }"></ng-container> | ||
| </div> | ||
| <div class="tab-item-container" routerLink="fleet" routerLinkActive #tab5="routerLinkActive" > | ||
| <ng-container [ngTemplateOutlet]="tabItemTemplate" [ngTemplateOutletContext]="{ enabled: tab5.isActive, tabName: 'fleet' }"></ng-container> | ||
|
|
||
| <div class="current-tab-info-wrapper"> | ||
|
mddragnev marked this conversation as resolved.
Outdated
|
||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemInfoTemplate" | ||
| *ngIf="tab1.isActive" | ||
| [ngTemplateOutletContext]="{ tabName: 'inventory' }" | ||
| ></ng-container> | ||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemInfoTemplate" | ||
| *ngIf="tab2.isActive" | ||
| [ngTemplateOutletContext]="{ tabName: 'hr-portal' }" | ||
| ></ng-container> | ||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemInfoTemplate" | ||
| *ngIf="tab3.isActive" | ||
| [ngTemplateOutletContext]="{ tabName: 'finance' }" | ||
| ></ng-container> | ||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemInfoTemplate" | ||
| *ngIf="tab4.isActive" | ||
| [ngTemplateOutletContext]="{ tabName: 'sales' }" | ||
| ></ng-container> | ||
| <ng-container | ||
| [ngTemplateOutlet]="tabItemInfoTemplate" | ||
| *ngIf="tab5.isActive" | ||
| [ngTemplateOutletContext]="{ tabName: 'fleet' }" | ||
| ></ng-container> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="router-container"> | ||
| <router-outlet></router-outlet> | ||
| </div> | ||
| </div> | ||
|
|
||
| <ng-template #tabItemTemplate let-enabled="enabled" let-tabName="tabName"> | ||
| <div #tabItem class="tab-item" [ngClass]="{'tab-item--selected': enabled}"> | ||
| <div class="tab-header" [ngClass]="{'tab-header--disabled': !enabled}"> | ||
| {{ tabInfo.get(tabName)?.title }} | ||
| <igx-chip [disabled]="!enabled">{{ tabInfo.get(tabName)?.theme }}</igx-chip> | ||
| <ng-template #tabItemInfoTemplate let-tabName="tabName"> | ||
| <div #tabItemInfo class="current-tab-info"> | ||
| <div class="sample-info"> | ||
| <div class="tab-header">{{ tabInfo.get(tabName)?.title }}</div> | ||
| <div class="tab-description">{{ tabInfo.get(tabName)?.content }}</div> | ||
| </div> | ||
| <div class="tab-content" [ngClass]="{'tab-content--disabled': !enabled}"> | ||
| <span>{{ tabInfo.get(tabName)?.content }}</span> | ||
| </div> | ||
| <div class="tab-actions"> | ||
| <a class="learn-text" href="{{ tabInfo.get(tabName)?.moreLink }}" (click)="onLinkClick($event)" [ngClass]="{'link--disabled': !enabled}">Learn more</a> | ||
| <button igxRipple [igxIconButton]="'contained'" [ngClass]="{'button--disabled': !enabled}" (click)="onDownloadClick($event, tabName)" [igxTooltipTarget]="tooltipRef"><igx-icon name="file_download" family="internal_indigo"></igx-icon></button> | ||
|
|
||
| <div class="sample-actions"> | ||
| <div class="theme-info">Theme: {{ tabInfo.get(tabName)?.theme }}</div> | ||
| <div class="theme-info">Mode: {{ tabInfo.get(tabName)?.themeMode }}</div> | ||
| <div> | ||
|
mddragnev marked this conversation as resolved.
Outdated
|
||
| <button | ||
| igxButton="outlined" | ||
| class="custom-button" | ||
| style="margin-right: 8px" | ||
| (click)="onDownloadClick($event, tabName)" | ||
| > | ||
| <igx-icon family="custom" name="file_download"></igx-icon> | ||
| Download | ||
| </button> | ||
|
|
||
| <button | ||
| igxButton="outlined" | ||
| class="custom-button" | ||
| style="margin-right: 8px" | ||
| (click)="onViewMoreClick($event, tabName)" | ||
| > | ||
| <igx-icon family="custom" name="view_more"></igx-icon> | ||
| View More | ||
| </button> | ||
|
|
||
| <button | ||
| igxButton="outlined" | ||
| class="custom-button" | ||
| (click)="onToggleFullscreen()" | ||
| > | ||
| <igx-icon family="custom" [name]="isFullscreen ? 'exit_fullscreen' : 'fullscreen'"></igx-icon> | ||
| <span>{{ isFullscreen ? 'Exit Fullscreen' : 'Fullscreen' }}</span> | ||
| </button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </ng-template> | ||
|
|
||
| <div #tooltipRef="tooltip" igxTooltip> | ||
| Download sample. | ||
| </div> | ||
| <ng-template #tabItemTemplate let-enabled="enabled" let-tabName="tabName"> | ||
| <div #tabItem class="tab-item" [ngClass]="{ 'tab-item--selected': enabled }"> | ||
| <div class="tab-header" [ngClass]="{ 'tab-header--disabled': !enabled }"> | ||
| {{ tabInfo.get(tabName)?.title?.toUpperCase() }} | ||
| </div> | ||
| </div> | ||
| </ng-template> | ||
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.