File manager - Edit - /home/u300416816/domains/recipeseasy.online/public_html/resources/views/backend/dashboard/index.blade.php
Back
@extends('backend.layout') @section('content') <style> /* Wrapper for the image */ .game-image-wrapper { position: relative; display: inline-block; width: 100%; /* Adjust width as needed */ overflow: hidden; } .game-image-wrapper img { width: 100%; /* Ensure the image takes the full width of the container */ display: block; } /* Background overlay effect */ .game-image-wrapper:hover::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */ z-index: 1; /* Ensure the background is behind the icon */ } /* Centered URL icon */ .game-url-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); /* Center the icon */ color: white; font-size: 30px; /* Adjust icon size as needed */ display: none; /* Hide icon by default */ z-index: 2; /* Ensure the icon is above the background */ } .game-image-wrapper:hover .game-url-icon { display: block; /* Show the icon on hover */ } </style> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1 class="m-0">Dashboard</h1> </div><!-- /.col --> <div class="col-sm-6"> <ol class="breadcrumb float-sm-right"> <li class="breadcrumb-item"><a href="{{route('dashboard')}}">Home</a></li> <li class="breadcrumb-item active">Dashboard</li> </ol> </div><!-- /.col --> </div><!-- /.row --> </div><!-- /.container-fluid --> </div> <!-- /.content-header --> <!-- Main content --> <section class="content"> <div class="container-fluid"> <!-- Info boxes --> <div class="row"> <div class="col-12 col-sm-6 col-md-3"> <div class="info-box"> <span class="info-box-icon bg-info elevation-1"><i class="fas fa-chess"></i></span> <div class="info-box-content"> <span class="info-box-text">Total Available Games</span> <span class="info-box-number"> {{$totalGames}} </span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- fix for small devices only --> <div class="clearfix hidden-md-up"></div> <div class="col-12 col-sm-6 col-md-3"> <div class="info-box mb-3"> <span class="info-box-icon bg-success elevation-1"><i class="fa fa-list-alt"></i></span> <div class="info-box-content"> <span class="info-box-text">Categories</span> <span class="info-box-number">{{ $totalCategories }}</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> <div class="col-12 col-sm-6 col-md-3"> <div class="info-box mb-3"> <span class="info-box-icon bg-warning elevation-1"><i class="fas fa-users"></i></span> <div class="info-box-content"> <span class="info-box-text">Members</span> <span class="info-box-number">{{ $totalUsers }}</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> <!-- /.col --> <div class="col-12 col-sm-6 col-md-3"> <div class="info-box mb-3"> <span class="info-box-icon bg-danger elevation-1"><i class="fas fa-thumbs-up"></i></span> <div class="info-box-content"> <span class="info-box-text">Likes</span> <span class="info-box-number">{{ $totalLikes }}</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> </div> <!-- /.col --> </div> <!-- /.row --> <!-- Main row --> <div class="row"> <!-- Left col --> <div class="col-md-8"> <!-- /.card --> <div class="row"> <div class="col-md-6"> <!-- USERS LIST --> <div class="card"> <div class="card-header"> <h3 class="card-title">Most Loved Games</h3> </div> <!-- /.card-header --> <div class="card-body p-0"> <ul class="users-list clearfix"> @foreach ($mostLikedGames as $likedgame) <li> <div class="game-image-wrapper"> <img src="{{ asset('images/games/icons/' . $likedgame->image) }}" alt="User Image" width="150" height="150" style="width: 100px; height: 100px;"> <a href="{{route('game', $likedgame->slug)}}" target="_blank" class="game-url-icon"> <i class="fas fa-link"></i> <!-- FontAwesome icon --> </a> </div> <a class="users-list-name" href="{{route('game', $likedgame->slug)}}" target="_blank">{{ $likedgame->name }}</a> @php $category = App\Models\Category::where('id', $likedgame->category_id)->first(); @endphp <span class="users-list-date">{{ $category->name }}</span> </li> @endforeach </ul> <!-- /.users-list --> </div> <!-- /.card-footer --> </div> <!--/.card --> </div> <!-- /.col --> <div class="col-md-6"> <!-- USERS LIST --> <div class="card"> <div class="card-header"> <h3 class="card-title">Today's games to be added</h3> </div> <!-- /.card-header --> <div class="card-body p-0"> <ul class="users-list clearfix"> @foreach (array_slice($gametoAdd, 0, 8) as $game) <li> <div class="game-image-wrapper"> <img src=" {{$game['thumb']}} " alt="User Image" width="150" height="150" style="width: 100px; height: 100px;"> <button class="btn btn-sm btn-success game-url-icon add-game" onclick="attachAddGameListeners(this)" data-title="{{ $game['title'] }}" data-description="{{ $game['description'] }}" data-image="{{ $game['thumb'] }}" data-banner="{{ $game['thumb'] }}" data-url="{{ $game['url'] }}" data-category="{{ $game['category'] }}" data-slug="{{ $game['title'] }}" data-tags="{{ $game['tags'] }}"> <i class="fas fa-plus"></i> </button> </div> <a class="users-list-name" href="#">{{$game['title']}}</a> <span class="users-list-date">{{ $game['category'] }}</span> </li> @endforeach </ul> <!-- /.users-list --> </div> <!-- /.card-footer --> </div> <!--/.card --> </div> <!-- /.col --> </div> <!-- /.row --> <!-- TABLE: LATEST ORDERS --> <div class="card"> <div class="card-header border-transparent"> <h3 class="card-title">Top 10 Games</h3> <div class="card-tools"> <button type="button" class="btn btn-tool" data-card-widget="collapse"> <i class="fas fa-minus"></i> </button> <button type="button" class="btn btn-tool" data-card-widget="remove"> <i class="fas fa-times"></i> </button> </div> </div> <!-- /.card-header --> <div class="card-body p-0"> <div class="table-responsive"> <table class="table m-0"> <thead> <tr> <th>Image</th> <th>Game Name</th> <th>Status</th> <th>Popularity</th> <th>View</th> </tr> </thead> <tbody> @foreach ($popularGames as $popular) <tr> <td> <img src="{{asset('images/games/icons/' . $popular->image)}}" width="30" class="user-image"> </td> <td>{{$popular->name}}</td> <td> @if ($popular->status == 1) <span class="badge badge-success">Active</span> @else <span class="badge badge-danger">Inactive</span> @endif </td> <td> <div class="sparkbar" data-color="#00a65a" data-height="20">{{$popular->views}}</div> </td> <td> <a href="{{route('game', $popular->slug)}}" target="_blank" class="btn btn-sm btn-success"><i class="fa fa-eye"></i></a> </td> </tr> @endforeach </tbody> </table> </div> <!-- /.table-responsive --> </div> <!-- /.card-body --> <div class="card-footer clearfix"> <a href="javascript:void(0)" class="btn btn-sm btn-info float-left">Play Popular Games</a> <a href="{{route('admin.games')}}" class="btn btn-sm btn-secondary float-right">View All Games</a> </div> <!-- /.card-footer --> </div> <!-- /.card --> </div> <!-- /.col --> <div class="col-md-4"> <!-- Info Boxes Style 2 --> <div class="info-box mb-3 bg-warning"> <span class="info-box-icon"><i class="fas fa-tag"></i></span> <div class="info-box-content"> <span class="info-box-text">Today's Added Games</span> <span class="info-box-number">{{$todayAddedGames}}</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> <div class="info-box mb-3 bg-success"> <span class="info-box-icon"><i class="far fa-user"></i></span> <div class="info-box-content"> <span class="info-box-text">Visitors</span> <span class="info-box-number">{{$uniqueVisitors ?? ''}}</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> <div class="info-box mb-3 bg-danger"> <span class="info-box-icon"><i class="fas fa-book-open"></i></span> <div class="info-box-content"> <span class="info-box-text">Monthly Pageviews</span> <span class="info-box-number">{{ $monthlyPageViews ?? '' }}</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> <div class="info-box mb-3 bg-info"> <span class="info-box-icon"><i class="far fa-map"></i></span> <div class="info-box-content"> <span class="info-box-text">Total Pageviews</span> <span class="info-box-number">{{$totalPageViews ?? ''}}</span> </div> <!-- /.info-box-content --> </div> <!-- /.info-box --> <!-- PRODUCT LIST --> <div class="card"> <div class="card-header"> <h3 class="card-title">Recently Added Games</h3> </div> <!-- /.card-header --> <div class="card-body p-0"> <ul class="products-list product-list-in-card pl-2 pr-2"> @foreach ($recentGames as $game) <li class="item"> <div class="product-img"> <img src="{{asset('images/games/icons/' . $game->image)}}" alt="Product Image" class="img-size-50"> </div> <div class="product-info"> <a href="{{route('game', $game->slug)}}" target="_blank" class="product-title">{{ $game->name }} </a> <span class="product-description"> {{ $game->description }} </span> </div> </li> @endforeach <!-- /.item --> </ul> </div> <!-- /.card-body --> <div class="card-footer text-center"> <a href="javascript:void(0)" class="uppercase">View All Products</a> </div> <!-- /.card-footer --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </div><!--/. container-fluid --> </section> <link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" /> <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script> <script> // Initialize Leaflet Map var map = L.map('map').setView([37.0902, -95.7129], 4); // Center on the US L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 19 }).addTo(map); // Function to add markers for user visits function addMarker(lat, lng) { L.marker([lat, lng]).addTo(map); } // Track real-time updates using Laravel Echo Echo.channel('visits') .listen('UserVisited', (data) => { addMarker(data.lat, data.lng); }); </script> <script> function attachAddGameListeners(button) { // Get the data from the clicked button let gameData = { title: $(button).data('title'), description: $(button).data('description'), image: $(button).data('image'), banner: $(button).data('banner'), url: $(button).data('url'), category: $(button).data('category'), slug: $(button).data('slug'), tags: $(button).data('tags'), _token: '{{ csrf_token() }}' }; // AJAX request to add the game to the database $.ajax({ url: '{{ route('admin.add.dash') }}', // Laravel route to handle the addition method: 'POST', data: gameData, success: function (response) { toastr.success('Game added successfully!'); }, error: function (error) { alert('Failed to add game. Please try again.'); console.log(error); } }); } </script> @endsection
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings