Sidebar 2.0
This commit is contained in:
parent
a996f80821
commit
5a69515a08
@ -6,7 +6,7 @@
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
opacity: 95%;
|
opacity: 95%;
|
||||||
background: rgba(34, 129, 247, 0.8);
|
/* background: rgba(34, 129, 247, 0.8); */
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav a {
|
.nav a {
|
||||||
|
@ -2,35 +2,21 @@
|
|||||||
|
|
||||||
<!-- sidebar div -->
|
<!-- sidebar div -->
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="logo">
|
<div class="sidebar-wrapper">
|
||||||
<a class="simple-text logo-normal">
|
|
||||||
Taskboard
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<!-- linklist -->
|
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li routerLinkActive="active">
|
<li
|
||||||
<a routerLink="/dashboard">
|
routerLinkActive="active"
|
||||||
<p>Dashboard</p>
|
*ngFor="let menuItem of menuItems"
|
||||||
</a>
|
class="{{ menuItem.class }} nav-item"
|
||||||
</li>
|
>
|
||||||
<li routerLinkActive="active">
|
<a [routerLink]="[menuItem.path]">
|
||||||
<a routerLink="/sprints">
|
<i class="tim-icons {{ menuItem.icon }}"></i>
|
||||||
<p>Sprints</p>
|
<p>{{ menuItem.title }}</p>
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li routerLinkActive="active">
|
|
||||||
<a routerLink="/userstories">
|
|
||||||
<p>Userstories</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li routerLinkActive="active">
|
|
||||||
<a routerLink="/tasks">
|
|
||||||
<p>Tasks</p>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
|
|
||||||
@ -42,7 +28,7 @@
|
|||||||
<i class="fa fa-cog fa-2x"></i>
|
<i class="fa fa-cog fa-2x"></i>
|
||||||
</a>
|
</a>
|
||||||
<ul ngbDropdownMenu>
|
<ul ngbDropdownMenu>
|
||||||
<!--
|
<
|
||||||
<li class=" header-title">Sidebar Background</li>
|
<li class=" header-title">Sidebar Background</li>
|
||||||
<li class=" adjustments-line">
|
<li class=" adjustments-line">
|
||||||
<a class=" switch-trigger background-color" href="javascript:void(0)">
|
<a class=" switch-trigger background-color" href="javascript:void(0)">
|
||||||
@ -64,7 +50,7 @@
|
|||||||
<div class=" clearfix"></div>
|
<div class=" clearfix"></div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
-->
|
|
||||||
<li class=" adjustments-line text-center color-change">
|
<li class=" adjustments-line text-center color-change">
|
||||||
<span class=" color-label"> LIGHT MODE </span>
|
<span class=" color-label"> LIGHT MODE </span>
|
||||||
<span class=" badge light-badge mr-2" (click)="changeDashboardColor('white-content')"> </span>
|
<span class=" badge light-badge mr-2" (click)="changeDashboardColor('white-content')"> </span>
|
||||||
|
@ -1,12 +1,65 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
declare interface RouteInfo {
|
||||||
|
path: string;
|
||||||
|
title: string;
|
||||||
|
icon: string;
|
||||||
|
class: string;
|
||||||
|
}
|
||||||
|
export const ROUTES: RouteInfo[] = [
|
||||||
|
{
|
||||||
|
path: "/dashboard",
|
||||||
|
title: "Dashboard",
|
||||||
|
icon: "icon-chart-pie-36",
|
||||||
|
class: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/backlog",
|
||||||
|
title: "Backlog",
|
||||||
|
icon: "icon-atom",
|
||||||
|
class: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/userstories",
|
||||||
|
title: "Userstories",
|
||||||
|
icon: "icon-pin",
|
||||||
|
class: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/tasks",
|
||||||
|
title: "Tasks",
|
||||||
|
icon: "icon-bell-55",
|
||||||
|
class: ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/sprints",
|
||||||
|
title: "Sprints",
|
||||||
|
icon: "icon-single-02",
|
||||||
|
class: ""
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrls: ['./app.component.css']
|
styleUrls: ['./app.component.css']
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
/*
|
|
||||||
|
menuItems: any[];
|
||||||
|
public sidebarColor: string = "blue";
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.menuItems = ROUTES.filter(menuItem => menuItem);
|
||||||
|
}
|
||||||
|
isMobileMenu() {
|
||||||
|
if (window.innerWidth > 991) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
changeSidebarColor(color){
|
changeSidebarColor(color){
|
||||||
var sidebar = document.getElementsByClassName('sidebar')[0];
|
var sidebar = document.getElementsByClassName('sidebar')[0];
|
||||||
var mainPanel = document.getElementsByClassName('main-panel')[0];
|
var mainPanel = document.getElementsByClassName('main-panel')[0];
|
||||||
@ -20,7 +73,7 @@ export class AppComponent {
|
|||||||
mainPanel.setAttribute('data',color);
|
mainPanel.setAttribute('data',color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
changeDashboardColor(color){
|
changeDashboardColor(color){
|
||||||
var body = document.getElementsByTagName('body')[0];
|
var body = document.getElementsByTagName('body')[0];
|
||||||
if (body && color === 'white-content') {
|
if (body && color === 'white-content') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user