book case stats added

This commit is contained in:
HolgerHatGarKeineNode
2023-04-06 14:45:41 +02:00
parent b434f583bd
commit f5cb71f67c
5 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Http\Livewire\BookCase;
use App\Models\OrangePill;
use App\Models\User;
use Livewire\Component;
class Stats extends Component
{
public function render()
{
return view('livewire.book-case.stats', [
'orangePills' => OrangePill::query()->count(),
'plebs' => User::query()->whereHas('orangePills')->count(),
]);
}
}

View File

@@ -7,6 +7,8 @@
<section class="w-full mb-12"> <section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10"> <div class="max-w-screen-2xl mx-auto px-2 sm:px-10">
<livewire:book-case.stats/>
<h1 class="text-xl font-bold py-4 text-gray-200"> <h1 class="text-xl font-bold py-4 text-gray-200">
{{ __('Orange Pill Heatmap') }} {{ __('Orange Pill Heatmap') }}
</h1> </h1>

View File

@@ -4,6 +4,9 @@
{{-- MAIN --}} {{-- MAIN --}}
<section class="w-full mb-12"> <section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table"> <div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
<livewire:book-case.stats/>
<div class="md:flex md:items-center md:justify-between"> <div class="md:flex md:items-center md:justify-between">
<div class="min-w-0 flex-1"> <div class="min-w-0 flex-1">
<h2 class="text-2xl font-bold leading-7 text-white sm:truncate sm:text-3xl sm:tracking-tight"> <h2 class="text-2xl font-bold leading-7 text-white sm:truncate sm:text-3xl sm:tracking-tight">

View File

@@ -0,0 +1,23 @@
<div class="bg-gray-900 py-12 sm:py-24">
<div class="mx-auto max-w-7xl px-6 lg:px-8">
<dl class="grid grid-cols-1 gap-x-8 gap-y-16 text-center lg:grid-cols-2">
<div class="mx-auto flex max-w-xs flex-col gap-y-4">
<dt class="text-base leading-7 text-gray-400">
{{ __('Book cases orange pilled') }}
</dt>
<dd class="order-first text-3xl font-semibold tracking-tight text-white sm:text-5xl">
{{ number_format($orangePills, 0, ',', '.') }}
</dd>
</div>
<div class="mx-auto flex max-w-xs flex-col gap-y-4">
<dt class="text-base leading-7 text-gray-400">
{{ __('Number of plebs') }}
</dt>
<dd class="order-first text-3xl font-semibold tracking-tight text-white sm:text-5xl">
{{ number_format($plebs, 0, ',', '.') }}
</dd>
</div>
</dl>
</div>
</div>

View File

@@ -7,6 +7,8 @@
<section class="w-full mb-12"> <section class="w-full mb-12">
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10"> <div class="max-w-screen-2xl mx-auto px-2 sm:px-10">
<livewire:book-case.stats/>
<h1 class="text-xl font-bold py-4 text-gray-200"> <h1 class="text-xl font-bold py-4 text-gray-200">
{{ __('World Map') }} {{ __('World Map') }}
</h1> </h1>