Add local groups as statistics

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-09-30 10:42:19 +02:00
parent 2dccd5eccd
commit a600720062
9 changed files with 79 additions and 5 deletions

View File

@@ -6,6 +6,7 @@ export const STATISTICS = gql`
numberOfUsers
numberOfEvents
numberOfComments
numberOfGroups
}
}
`;

View File

@@ -2,4 +2,5 @@ export interface IStatistics {
numberOfUsers: number;
numberOfEvents: number;
numberOfComments: number;
numberOfGroups: number;
}

View File

@@ -13,6 +13,9 @@
<i18n tag="p" path="Home to {number} users">
<strong slot="number">{{ statistics.numberOfUsers }}</strong>
</i18n>
<i18n tag="p" path="and {number} groups">
<strong slot="number">{{ statistics.numberOfGroups }}</strong>
</i18n>
<i18n tag="p" path="Who published {number} events">
<strong slot="number">{{ statistics.numberOfEvents }}</strong>
</i18n>
@@ -135,10 +138,11 @@ section {
&.contact-statistics {
margin: 2px auto;
.statistics {
display: flex;
display: grid;
grid-template-columns: repeat(auto-fit, 150px);
grid-template-rows: repeat(2, 1fr);
p {
text-align: right;
flex: 1;
padding: 0 15px;
& > * {