Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Feature/sidenav fix #186

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
}

mat-expansion-panel{
width: 300px;
width: 290px;
padding: 5px;
}

.font-cont{
font-size: 16px;
}

.spinner-cont{
mat-spinner{
margin-left: 130px;
margin-top: 10px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
</mat-expansion-panel>
</mat-accordion>

<mat-spinner *ngIf="!isTableEmpty" [diameter]="30" class="spinner-cont" [color]=""></mat-spinner>
<mat-spinner *ngIf="!isTableEmpty" [diameter]="30"></mat-spinner>
4 changes: 2 additions & 2 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

<mat-sidenav-container>
<mat-sidenav
#sidenav mode="side"
#sidenav [mode]="isMobile() ? 'over' : 'side'"
class="app-side-nav"
[opened]="true">
[opened]="!isMobile()">
<mat-list>
<div class="btn-group-vertical">
<button mat-raised-button
Expand Down
11 changes: 10 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,22 @@
limitations under the License.
*/

import { Component } from '@angular/core';
import {Component, HostListener} from '@angular/core';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})

export class AppComponent {
title = 'Spectre';
minimalPixels = 720;

isMobile() {
const innerWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;

return innerWidth < this.minimalPixels;
}

}