aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r--client/src/app/app.component.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index c29790d96..14870bb5f 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -24,6 +24,8 @@ export class AppComponent implements OnInit {
24 rtl: false 24 rtl: false
25 }; 25 };
26 26
27 isMenuDisplayed = true;
28
27 constructor( 29 constructor(
28 private router: Router, 30 private router: Router,
29 private authService: AuthService, 31 private authService: AuthService,
@@ -48,4 +50,26 @@ export class AppComponent implements OnInit {
48 isInAdmin() { 50 isInAdmin() {
49 return this.router.url.indexOf('/admin/') !== -1; 51 return this.router.url.indexOf('/admin/') !== -1;
50 } 52 }
53
54 toggleMenu() {
55 this.isMenuDisplayed = !this.isMenuDisplayed;
56 }
57
58 getMainColClasses() {
59 const colSizes = {
60 md: 10,
61 sm: 9,
62 xs: 9
63 }
64
65 // Take all width is the menu is not displayed
66 if (this.isMenuDisplayed === false) {
67 Object.keys(colSizes).forEach(col => colSizes[col] = 12);
68 }
69
70 const classes = [ "main-col" ];
71 Object.keys(colSizes).forEach(col => classes.push(`col-${col}-${colSizes[col]}`));
72
73 return classes;
74 }
51} 75}