mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-06-29 04:55:11 +00:00
All the enabled layouts are now enlisted on the sidebar in accordance with config.ts
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<div class="tfw-ide-pin">
|
||||
<img src="images/IDE.svg">
|
||||
<img class="active" src="images/IDE_active.svg">
|
||||
<div class="tfw-ide-pin" *ngFor="let layoutIter of enabledLayouts">
|
||||
<div *ngIf="layout === layoutIter"><img src="images/{{layoutIter}}_active.svg"></div>
|
||||
<div *ngIf="layout !== layoutIter"><img src="images/{{layoutIter}}.svg"></div>
|
||||
</div>
|
||||
|
@ -4,13 +4,11 @@
|
||||
img {
|
||||
width: 50px;
|
||||
height: auto;
|
||||
padding-top: 75px;
|
||||
}
|
||||
|
||||
.tfw-ide-pin {
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
& .active {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,16 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { config } from '../config';
|
||||
|
||||
@Component({
|
||||
selector: 'app-sidebar',
|
||||
templateUrl: './sidebar.component.html',
|
||||
styleUrls: ['./sidebar.component.scss']
|
||||
})
|
||||
|
||||
export class SidebarComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
layout: string = config.dashboard.currentLayout;
|
||||
enabledLayouts: Set<string> = config.dashboard.enabledLayouts;
|
||||
constructor() {}
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user