@extends('admin.layout.app')
@section('title', 'Dashboard')
@section('content')
<div class="h-100">
<div class="row mb-3 pb-1">
<div class="col-12">
<div class="d-flex align-items-lg-center flex-lg-row flex-column">
<div class="flex-grow-1">
<h4 class="fs-16 mb-1">Hello, Radio Kaya!</h4>
</div>
</div><!-- end card header -->
</div>
<!--end col-->
</div>
<!--end row-->
<div class="row">
<div class="col-xl-3 col-md-6">
<!-- card -->
<div class="card card-animate">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="flex-grow-1 overflow-hidden">
<p class="text-uppercase fw-medium text-muted text-truncate mb-0">Programmes</p>
</div>
</div>
<div class="d-flex align-items-end justify-content-between mt-4">
<div>
<h4 class="fs-22 fw-semibold ff-secondary mb-4">{{$programmes}} </h4>
<a href="{{route('admin.schedule.all')}}" class="text-decoration-underline">View More</a>
</div>
<div class="avatar-sm flex-shrink-0">
<span class="avatar-title bg-soft-success rounded fs-3">
<i class="bx bx-calendar-check text-success"></i>
</span>
</div>
</div>
</div><!-- end card body -->
</div><!-- end card -->
</div><!-- end col -->
<div class="col-xl-3 col-md-6">
<!-- card -->
<div class="card card-animate">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="flex-grow-1 overflow-hidden">
<p class="text-uppercase fw-medium text-muted text-truncate mb-0">News & Podcasts</p>
</div>
</div>
<div class="d-flex align-items-end justify-content-between mt-4">
<div>
<h4 class="fs-22 fw-semibold ff-secondary mb-4">{{$news_count}}</h4>
<a href="{{route('admin.news_podcasts.all')}}" class="text-decoration-underline">View More</a>
</div>
<div class="avatar-sm flex-shrink-0">
<span class="avatar-title bg-soft-info rounded fs-3">
<i class="bx bx-news text-info"></i>
</span>
</div>
</div>
</div><!-- end card body -->
</div><!-- end card -->
</div><!-- end col -->
<div class="col-xl-3 col-md-6">
<!-- card -->
<div class="card card-animate">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="flex-grow-1 overflow-hidden">
<p class="text-uppercase fw-medium text-muted text-truncate mb-0">App Images</p>
</div>
</div>
<div class="d-flex align-items-end justify-content-between mt-4">
<div>
<h4 class="fs-22 fw-semibold ff-secondary mb-4">{{$app_images}} </h4>
<a href="{{route('admin.images.all')}}" class="text-decoration-underline">View More</a>
</div>
<div class="avatar-sm flex-shrink-0">
<span class="avatar-title bg-soft-warning rounded fs-3">
<i class="bx bx-images text-warning"></i>
</span>
</div>
</div>
</div><!-- end card body -->
</div><!-- end card -->
</div><!-- end col -->
<div class="col-xl-3 col-md-6">
<!-- card -->
<div class="card card-animate">
<div class="card-body">
<div class="d-flex align-items-center">
<div class="flex-grow-1 overflow-hidden">
<p class="text-uppercase fw-medium text-muted text-truncate mb-0"> Facebook Links</p>
</div>
</div>
<div class="d-flex align-items-end justify-content-between mt-4">
<div>
<h4 class="fs-22 fw-semibold ff-secondary mb-4">{{$fbLinks}}</h4>
<a href="{{route('admin.facebook_link.all')}}" class="text-decoration-underline">View More</a>
</div>
<div class="avatar-sm flex-shrink-0">
<span class="avatar-title bg-soft-primary rounded fs-3">
<i class="bx bx-link-alt text-primary"></i>
</span>
</div>
</div>
</div><!-- end card body -->
</div><!-- end card -->
</div><!-- end col -->
</div> <!-- end row-->
<div class="card">
<div class="card-header align-items-center d-flex">
<h4 class="card-title mb-0 flex-grow-1">Latest News & Podcasts</h4>
<div class="flex-shrink-0">
</div>
</div><!-- end card header -->
<div class="card-body">
<div class="live-preview">
<div class="table-responsive">
<table class="table align-middle table-nowrap mb-0">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Type</th>
<th scope="col">Headline</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
@foreach($news as $news )
<tr>
<td>{{$loop->iteration}}</td>
<td>{{$news->type==1? 'News':'Podcast'}}</td>
<td>{{$news->title}}</td>
<td><a href="{{route('admin.news_podcasts.edit', $news->id)}}" class="link-success">View<i class="ri-arrow-right-line align-middle"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div><!-- end card-body -->
</div>
</div>
@endsection