Responsive statistics card in admin dashboard.
This commit is contained in:
parent
e885975aff
commit
33f076b1b6
|
@ -89,6 +89,14 @@ $nav-header-logo-margin: 0 0.5em 0 0;
|
||||||
$nav-footer-padding: 0.75em;
|
$nav-footer-padding: 0.75em;
|
||||||
|
|
||||||
// Statistics
|
// Statistics
|
||||||
|
$statistics-card-widths: (
|
||||||
|
xs: 100%,
|
||||||
|
sm: 50%,
|
||||||
|
md: 50%,
|
||||||
|
lg: 33.3333%,
|
||||||
|
xl: 33.3333%,
|
||||||
|
xxl: 33.3333%,
|
||||||
|
);
|
||||||
$statistics-card-height: 4.5em;
|
$statistics-card-height: 4.5em;
|
||||||
$statistics-card-margin: 0.5em;
|
$statistics-card-margin: 0.5em;
|
||||||
$statistics-card-padding: 0.3em 0.5em;
|
$statistics-card-padding: 0.3em 0.5em;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import StatisticsCard from "@/components/admin/StatisticsCard.vue";
|
import StatisticsCard from "@/components/admin/StatisticsCard.vue";
|
||||||
import {useStatisticsStore} from "@/stores/statistics";
|
import {useStatisticsStore} from "@/stores/statistics";
|
||||||
import {ComponentVariant, MonitoringState} from "@/types";
|
import {ComponentVariant, MonitoringState} from "@/types";
|
||||||
|
import PageContainer from "@/components/page/PageContainer.vue";
|
||||||
|
|
||||||
const statistics = useStatisticsStore();
|
const statistics = useStatisticsStore();
|
||||||
|
|
||||||
|
@ -13,7 +14,7 @@ refresh();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="statistics.getStatistics">
|
<PageContainer v-if="statistics.getStatistics">
|
||||||
<h2>Knotenstatistik</h2>
|
<h2>Knotenstatistik</h2>
|
||||||
|
|
||||||
<div class="statistics">
|
<div class="statistics">
|
||||||
|
@ -57,13 +58,23 @@ refresh();
|
||||||
:filter="{monitoringState: MonitoringState.PENDING}"
|
:filter="{monitoringState: MonitoringState.PENDING}"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</PageContainer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@import "../scss/variables";
|
||||||
|
@import "../scss/mixins";
|
||||||
|
|
||||||
.statistics {
|
.statistics {
|
||||||
display: grid;
|
display: grid;
|
||||||
// TODO: Responsive sizes
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(25%, 100%));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@each $breakpoint, $width in $statistics-card-widths {
|
||||||
|
@include page-breakpoint($breakpoint) {
|
||||||
|
.statistics {
|
||||||
|
grid-template-columns: repeat(auto-fill, $width);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue