Jetstream dashboard
This commit is contained in:
111
resources/views/admin/analytics.blade.php
Normal file
111
resources/views/admin/analytics.blade.php
Normal file
@@ -0,0 +1,111 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
||||
{{ __('Analytics') }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-8">
|
||||
<div class="sm:grid sm:grid-cols-2 sm:gap-10">
|
||||
<div>
|
||||
<h2 class="text-2xl font-bold leading-tight text-gray-900">
|
||||
Visitors and Page Views(Last 2 days)
|
||||
</h2>
|
||||
<div class="flex flex-col mt-6">
|
||||
<div class="-my-2 py-2 overflow-x-auto sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8">
|
||||
<div
|
||||
class="align-middle inline-block min-w-full shadow overflow-hidden rounded-lg border-b border-gray-200">
|
||||
<table class="min-w-full">
|
||||
<tbody>
|
||||
<tr class="bg-white">
|
||||
<td
|
||||
class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-semibold text-gray-800">
|
||||
Page Title
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-semibold text-gray-800">
|
||||
Visitors
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-semibold text-gray-800">
|
||||
Page Views
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
@foreach ($VisitorsAndPageViews as $VisitorsAndPageView)
|
||||
<tr class="bg-gray-50">
|
||||
<td
|
||||
class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-medium text-gray-900">
|
||||
{{Str::limit($VisitorsAndPageView['pageTitle'],35)}}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
|
||||
{{$VisitorsAndPageView['visitors']}}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
|
||||
{{$VisitorsAndPageView['pageViews']}}
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-6 sm:mt-0">
|
||||
<h2 class="text-2xl font-bold leading-tight text-gray-900">
|
||||
Total Visitors and Page Views (Last 7 days)
|
||||
</h2>
|
||||
|
||||
<div class="flex flex-col mt-6">
|
||||
<div class="-my-2 py-2 overflow-x-auto sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8">
|
||||
<div
|
||||
class="align-middle inline-block min-w-full shadow overflow-hidden rounded-lg border-b border-gray-200">
|
||||
<table class="min-w-full">
|
||||
<tbody>
|
||||
<tr class="bg-white">
|
||||
<td
|
||||
class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-semibold text-gray-900">
|
||||
Date
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-semibold text-gray-900">
|
||||
Visitors
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5font-semibold text-gray-900">
|
||||
Page Views
|
||||
</td>
|
||||
</tr>
|
||||
@foreach ($TotalVisitorsAndPageViews as $TotalVisitorsAndPageView)
|
||||
<tr class="bg-gray-50">
|
||||
<td
|
||||
class="px-6 py-4 whitespace-no-wrap text-sm leading-5 font-medium text-gray-900">
|
||||
{{$TotalVisitorsAndPageView['date']->diffforHumans()}}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
|
||||
{{$TotalVisitorsAndPageView['visitors']}}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap text-sm leading-5 text-gray-500">
|
||||
{{$TotalVisitorsAndPageView['pageViews']}}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</x-app-layout>
|
||||
87
resources/views/admin/dashboard.blade.php
Normal file
87
resources/views/admin/dashboard.blade.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<x-app-layout>
|
||||
<x-slot name="header">
|
||||
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
||||
{{ __('Dashboard') }}
|
||||
</h2>
|
||||
</x-slot>
|
||||
|
||||
<div class="py-12">
|
||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
||||
<div class="bg-white overflow-hidden shadow-xl sm:rounded-lg">
|
||||
<div class="p-6 sm:px-20 bg-white border-b border-gray-200">
|
||||
<div class="mt-8 text-2xl font-semibold">
|
||||
Karudhaas Overview
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-gray-200 bg-opacity-25 grid grid-cols-1 md:grid-cols-3">
|
||||
<div class="p-6">
|
||||
<div class="flex items-center">
|
||||
<svg class="w-8 h-8 text-gray-400" fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4">
|
||||
</path>
|
||||
</svg>
|
||||
<div class="ml-4 text-lg text-gray-600 leading-7 font-semibold">Articles</div>
|
||||
</div>
|
||||
|
||||
<div class="ml-12">
|
||||
<div class="mt-2 text-gray-500 font-bold text-3xl">
|
||||
{{$total_articles}}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-6 border-t border-gray-200 md:border-t-0 md:border-l">
|
||||
<div class="flex items-center">
|
||||
<svg class="w-8 h-8 text-gray-400" fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7m0 10a2 2 0 002 2h2a2 2 0 002-2V7a2 2 0 00-2-2h-2a2 2 0 00-2 2">
|
||||
</path>
|
||||
</svg>
|
||||
<div class="ml-4 text-lg text-gray-600 leading-7 font-semibold">Topics</div>
|
||||
</div>
|
||||
|
||||
<div class="ml-12">
|
||||
<div class="mt-2 text-gray-500 font-bold text-3xl">
|
||||
{{$total_topics}}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-6 border-t border-gray-200">
|
||||
<div class="flex items-center">
|
||||
<svg class="w-8 h-8 text-gray-400" fill="none" stroke="currentColor" stroke-linecap="round"
|
||||
stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M19 20H5a2 2 0 01-2-2V6a2 2 0 012-2h10a2 2 0 012 2v1m2 13a2 2 0 01-2-2V7m2 13a2 2 0 002-2V9a2 2 0 00-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z">
|
||||
</path>
|
||||
</svg>
|
||||
<div class="ml-4 text-lg text-gray-600 leading-7 font-semibold">Sources</div>
|
||||
</div>
|
||||
|
||||
<div class="ml-12">
|
||||
<div class="mt-2 text-gray-500 font-bold text-3xl">
|
||||
{{$total_sources}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user