added some comments to code
This commit is contained in:
parent
d35d3e1ed6
commit
f0100d1bf7
@ -11,7 +11,7 @@
|
|||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* show curso position on link */
|
/* show cursor position on link */
|
||||||
.nav a:hover:not(.active) {
|
.nav a:hover:not(.active) {
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<ul ngbDropdownMenu>
|
<ul ngbDropdownMenu>
|
||||||
<
|
<
|
||||||
|
<!-- sidebar background -->
|
||||||
<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)">
|
||||||
@ -51,6 +52,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<!-- change dashboard-color for dark-/whitemode -->
|
||||||
<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,10 +1,15 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Interface for sidebar-links
|
||||||
|
*/
|
||||||
declare interface RouteInfo {
|
declare interface RouteInfo {
|
||||||
path: string;
|
path: string;
|
||||||
title: string;
|
title: string;
|
||||||
class: string;
|
class: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* define routes for sidebar-links */
|
||||||
export const ROUTES: RouteInfo[] = [
|
export const ROUTES: RouteInfo[] = [
|
||||||
{
|
{
|
||||||
path: "/dashboard",
|
path: "/dashboard",
|
||||||
@ -39,6 +44,8 @@ export const ROUTES: RouteInfo[] = [
|
|||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrls: ['./app.component.css']
|
styleUrls: ['./app.component.css']
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/* function to add and load sidebar */
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
||||||
menuItems: any[];
|
menuItems: any[];
|
||||||
@ -54,6 +61,7 @@ export class AppComponent {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* function to change sidebar color */
|
||||||
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];
|
||||||
@ -68,6 +76,7 @@ export class AppComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* function to change dashboard-color for darkmode and whitemode */
|
||||||
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') {
|
||||||
@ -77,17 +86,5 @@ export class AppComponent {
|
|||||||
body.classList.remove('white-content');
|
body.classList.remove('white-content');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// function that adds color white/transparent to the navbar on resize (this is for the collapse)
|
|
||||||
/*
|
|
||||||
updateColor = () => {
|
|
||||||
var navbar = document.getElementsByClassName('navbar')[0];
|
|
||||||
if (window.innerWidth < 993 && !this.isCollapsed) {
|
|
||||||
navbar.classList.add('bg-white');
|
|
||||||
navbar.classList.remove('navbar-transparent');
|
|
||||||
} else {
|
|
||||||
navbar.classList.remove('bg-white');
|
|
||||||
navbar.classList.add('navbar-transparent');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user