mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 23:40:14 +01:00
fix(dashboard): improve dashboard responsiveness
This commit is contained in:
parent
b7a8f6cb15
commit
c533cd7d5c
5 changed files with 35 additions and 17 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
<nb-card size="large">
|
<nb-card [size]="breakpoint.width >= 1600 ? 'large' : 'xlarge'">
|
||||||
<nb-tabset fullWidth>
|
<nb-tabset fullWidth>
|
||||||
<nb-tab tabTitle="Contacts">
|
<nb-tab tabTitle="Contacts">
|
||||||
<div class="contact" *ngFor="let c of contacts">
|
<div class="contact" *ngFor="let c of contacts">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { NbThemeService, NbMediaBreakpoint } from '@nebular/theme';
|
||||||
|
|
||||||
import { UserService } from '../../../@core/data/users.service';
|
import { UserService } from '../../../@core/data/users.service';
|
||||||
|
|
||||||
|
|
@ -10,10 +11,14 @@ import { UserService } from '../../../@core/data/users.service';
|
||||||
export class ContactsComponent implements OnInit {
|
export class ContactsComponent implements OnInit {
|
||||||
|
|
||||||
contacts: any[];
|
contacts: any[];
|
||||||
|
|
||||||
recent: any[];
|
recent: any[];
|
||||||
|
breakpoint: NbMediaBreakpoint;
|
||||||
|
|
||||||
constructor(private userService: UserService) {
|
constructor(private userService: UserService, private themeService: NbThemeService) {
|
||||||
|
themeService.onMediaQueryChange()
|
||||||
|
.subscribe(([oldValue, newValue]) => {
|
||||||
|
this.breakpoint = newValue;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
@ -41,5 +46,4 @@ export class ContactsComponent implements OnInit {
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,27 +25,25 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-3">
|
<div class="col-xxxl-3 col-xl-4 col-lg-5 col-md-12">
|
||||||
<ngx-temperature></ngx-temperature>
|
<ngx-temperature></ngx-temperature>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-9">
|
<div class="col-xxxl-9 col-xl-8 col-lg-7 col-md-12">
|
||||||
<ngx-electricity></ngx-electricity>
|
<ngx-electricity></ngx-electricity>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-9">
|
<div class="col-xxxl-9 col-xl-12">
|
||||||
<ngx-rooms></ngx-rooms>
|
<ngx-rooms></ngx-rooms>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-3">
|
<div class="col-xxxl-3 col-xxl-4 col-lg-7 col-md-6">
|
||||||
<ngx-contacts></ngx-contacts>
|
<ngx-contacts></ngx-contacts>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="col-xxxl-3 col-xxl-4 col-lg-5 col-md-6">
|
||||||
<div class="col-lg-3">
|
|
||||||
<nb-card size="xsmall" class="solar-card">
|
<nb-card size="xsmall" class="solar-card">
|
||||||
<nb-card-header>Solar Energy Consumption</nb-card-header>
|
<nb-card-header>Solar Energy Consumption</nb-card-header>
|
||||||
<nb-card-body>
|
<nb-card-body>
|
||||||
|
|
@ -56,12 +54,12 @@
|
||||||
<ngx-kitten></ngx-kitten>
|
<ngx-kitten></ngx-kitten>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-3">
|
<div class="col-xxxl-3 col-xxl-4 col-md-5">
|
||||||
<ngx-traffic></ngx-traffic>
|
<ngx-traffic></ngx-traffic>
|
||||||
<ngx-weather></ngx-weather>
|
<ngx-weather></ngx-weather>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-lg-6">
|
<div class="col-xxxl-6 col-xxl-12 col-md-7">
|
||||||
<ngx-security-cameras></ngx-security-cameras>
|
<ngx-security-cameras></ngx-security-cameras>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,10 @@
|
||||||
<nb-card-footer>
|
<nb-card-footer>
|
||||||
<nb-actions size="medium" fullWidth>
|
<nb-actions size="medium" fullWidth>
|
||||||
<nb-action>
|
<nb-action>
|
||||||
<i class="nb-pause"></i><span>Pause</span>
|
<i class="nb-pause-outline"></i><span>Pause</span>
|
||||||
</nb-action>
|
</nb-action>
|
||||||
<nb-action>
|
<nb-action>
|
||||||
<i class="nb-list"></i><span>Log View</span>
|
<i class="nb-list"></i><span>Logs</span>
|
||||||
</nb-action>
|
</nb-action>
|
||||||
<nb-action>
|
<nb-action>
|
||||||
<i class="nb-search"></i><span>Search</span>
|
<i class="nb-search"></i><span>Search</span>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
@import '../../../@theme/styles/themes';
|
@import '../../../@theme/styles/themes';
|
||||||
|
@import '~@nebular/theme/styles/global/bootstrap/breakpoints';
|
||||||
|
@import '~bootstrap/scss/mixins/breakpoints';
|
||||||
|
|
||||||
@include nb-install-component() {
|
@include nb-install-component() {
|
||||||
nb-card-header {
|
nb-card-header {
|
||||||
|
|
@ -103,10 +105,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
nb-action {
|
nb-action {
|
||||||
|
padding: 0 0.5rem 0 0;
|
||||||
|
|
||||||
i {
|
i {
|
||||||
color: nb-theme(color-fg);
|
color: nb-theme(color-fg);
|
||||||
font-size: 2rem;
|
font-size: 3rem;
|
||||||
margin-right: 1rem;
|
margin-right: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
|
@ -137,4 +141,16 @@
|
||||||
font-weight: nb-theme(font-weight-bolder);
|
font-weight: nb-theme(font-weight-bolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include media-breakpoint-down(lg) {
|
||||||
|
nb-action {
|
||||||
|
padding: 0;
|
||||||
|
i {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue