-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from DSI-HUG/fix-scss
fix: theming
- Loading branch information
Showing
31 changed files
with
402 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -601,5 +601,8 @@ | |
} | ||
} | ||
} | ||
}, | ||
"cli": { | ||
"analytics": false | ||
} | ||
} |
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
.../core/src/styles/mixins/loader-theme.scss → ...core/src/styles/mixins/_loader-theme.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
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
25 changes: 0 additions & 25 deletions
25
projects/core/src/styles/mixins/_ngx-components-theme.scss
This file was deleted.
Oops, something went wrong.
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 +1,31 @@ | ||
<b>Hello World</b> | ||
<div class="demo-container" | ||
[class.demo-is-mobile]="mobileQuery.matches"> | ||
<mat-toolbar color="primary" | ||
class="demo-toolbar"> | ||
<button mat-icon-button (click)="snav.toggle()"> | ||
<mat-icon>menu</mat-icon> | ||
</button> | ||
<h1 class="demo-app-name">@hug/ngx-components Demo</h1> | ||
</mat-toolbar> | ||
|
||
<mat-sidenav-container class="demo-sidenav-container" | ||
[style.marginTop.px]="mobileQuery.matches ? 56 : 0"> | ||
<mat-sidenav #snav | ||
[mode]="mobileQuery.matches ? 'over' : 'side'" | ||
[fixedInViewport]="mobileQuery.matches" | ||
fixedTopGap="56"> | ||
<mat-nav-list> | ||
<mat-list-item title="Overlay" | ||
routerLink="/overlay" | ||
routerLinkActive="active"> | ||
<mat-icon mat-list-icon>menu</mat-icon> | ||
<span mat-line>Overlay</span> | ||
</mat-list-item> | ||
</mat-nav-list> | ||
</mat-sidenav> | ||
|
||
<mat-sidenav-content> | ||
<router-outlet></router-outlet> | ||
</mat-sidenav-content> | ||
</mat-sidenav-container> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
:host { | ||
.demo-container { | ||
display: flex; | ||
flex-direction: column; | ||
position: absolute; | ||
top: 0; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
} | ||
|
||
.demo-is-mobile .demo-toolbar { | ||
position: fixed; | ||
/* Make sure the toolbar will stay on top of the content as it scrolls past. */ | ||
z-index: 2; | ||
} | ||
|
||
h1.demo-app-name { | ||
margin-left: 8px; | ||
} | ||
|
||
.demo-sidenav-container { | ||
/* When the sidenav is not fixed, stretch the sidenav container to fill the available space. This | ||
causes `<mat-sidenav-content>` to act as our scrolling element for desktop layouts. */ | ||
flex: 1; | ||
} | ||
|
||
.demo-is-mobile .demo-sidenav-container { | ||
/* When the sidenav is fixed, don't constrain the height of the sidenav container. This allows the | ||
`<body>` to be our scrolling element for mobile layouts. */ | ||
flex: 1 0 auto; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,14 +1,44 @@ | ||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
import { MediaMatcher } from '@angular/cdk/layout'; | ||
import { NgFor, NgIf } from '@angular/common'; | ||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, OnDestroy } from '@angular/core'; | ||
import { MatIconModule } from '@angular/material/icon'; | ||
import { MatListModule } from '@angular/material/list'; | ||
import { MatSidenavModule } from '@angular/material/sidenav'; | ||
import { MatToolbarModule } from '@angular/material/toolbar'; | ||
import { RouterOutlet } from '@angular/router'; | ||
|
||
|
||
@Component({ | ||
selector: 'app-root', | ||
standalone: true, | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
imports: [RouterOutlet], | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.scss'] | ||
styleUrls: ['./app.component.scss'], | ||
imports: [ | ||
MatIconModule, | ||
MatListModule, | ||
MatSidenavModule, | ||
MatToolbarModule, | ||
NgIf, | ||
NgFor, | ||
RouterOutlet | ||
] | ||
}) | ||
export class AppComponent { | ||
public title = 'demo-app'; | ||
export class AppComponent implements OnDestroy { | ||
protected mobileQuery: MediaQueryList; | ||
|
||
private _mobileQueryListener: () => void; | ||
|
||
private changeDetectorRef = inject(ChangeDetectorRef); | ||
private media = inject(MediaMatcher); | ||
|
||
public constructor() { | ||
this.mobileQuery = this.media.matchMedia('(max-width: 600px)'); | ||
this._mobileQueryListener = (): void => this.changeDetectorRef.detectChanges(); | ||
this.mobileQuery.addListener(this._mobileQueryListener); | ||
} | ||
|
||
public ngOnDestroy(): void { | ||
this.mobileQuery.removeListener(this._mobileQueryListener); | ||
} | ||
} |
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,3 +1,7 @@ | ||
import { Routes } from '@angular/router'; | ||
|
||
export const routes: Routes = []; | ||
export const appRoutes: Routes = [ | ||
{ path: '', redirectTo: 'overlay', pathMatch: 'full' }, | ||
{ path: 'overlay', loadComponent: () => import('./overlay/overlay-demo.component').then(m => m.OverlayDemoComponent), data: { title: 'Overlay' } }, | ||
{ path: '**', redirectTo: 'overlay', pathMatch: 'prefix' } | ||
]; |
Oops, something went wrong.