@extends('front.layouts.app') @section('content') @if ($trendingPosts->isNotEmpty())
TRENDING NOW
@php $first = $trendingPosts->first(); @endphp
@endif
{{-- UNIVERSITY OF RAWALPINDI --}} LATEST POSTS
@if ($universityOfRawalpindiPosts->first()) @php $featured = $universityOfRawalpindiPosts->first(); @endphp

{{ strtoupper($featured->category->name ?? 'LIFE AT UOR') }}

{{ $featured->title }}

{{ $featured->created_at->format('F d, Y') }}

{{ Str::limit($featured->excerpt, 150) }}

@endif
@foreach ($universityOfRawalpindiPosts->skip(1) as $post)
{{ $post->title }}
{{ $post->created_at->format('F d, Y') }}
@endforeach
MOST POPULAR
@foreach ($mostPopular as $blog)
{{ $blog->category->name ?? '' }} {{ $blog->title }}
@endforeach
{{-- ACADEMIC --}} PROGRAMS & LEARNING
{{-- old style featured and random posts --}} {{--
FEATURED
@if ($featuredBlogs->isNotEmpty()) @php $first = $featuredBlogs->first(); @endphp
{{ $first->title }}

{{ $first->category->name ?? 'Uncategorized' }}

{{ $first->title }}

{{ $first->published_at?->format('F d, Y') }}

{{ Str::limit($first->excerpt, 80) }}...

@foreach ($featuredBlogs->skip(1) as $post)
{{ $post->title }}
{{ $post->title }}
{{ $post->published_at?->format('F d, Y') }}
@endforeach @endif
RANDOM
@php $firstPost = $randomPosts->first(); @endphp @if ($firstPost)

{{ $firstPost->category->name }}

{{ $firstPost->title }}

{{ $firstPost->created_at->format('F d, Y') }}

{{ Str::limit($firstPost->excerpt, 80) }}...

@endif @foreach ($randomPosts->skip(1) as $post)
{{ $post->title }}
{{ $post->created_at->format('F d, Y') }}
@endforeach
--}}
@php $total = $featuredBlogs->count(); $half = ceil($total / 2); // left gets extra if odd $featuredLeft = $featuredBlogs->take($half); $featuredRight = $featuredBlogs->skip($half); @endphp {{-- OUTSIDE the row, spanning full width --}}
{{--
FEATURED
--}}
STUDENT SUCCESS & STUDY SKILLS
{{--
FEATURED
--}} @if ($featuredLeft->isNotEmpty()) @php $first = $featuredLeft->first(); @endphp
{{ $first->title }}

{{ $first->category->name ?? 'Uncategorized' }}

{{ $first->title }}

{{ $first->published_at?->format('F d, Y') }}

{{ Str::limit($first->excerpt, 80) }}...

@foreach ($featuredLeft->skip(1) as $post)
{{ $post->title }}
{{ $post->title }}
{{ $post->published_at?->format('F d, Y') }}
@endforeach @endif
{{--
{{--
FEATURED
--}} {{--
--}} @if ($featuredRight->isNotEmpty()) @php $firstPost = $featuredRight->first(); @endphp

{{ $firstPost->category->name ?? '' }}

{{ $firstPost->title }}

{{ $firstPost->created_at->format('F d, Y') }}

{{ Str::limit($firstPost->excerpt, 80) }}...

@foreach ($featuredRight->skip(1) as $post)
{{ $post->title }}
{{ $post->created_at->format('F d, Y') }}
@endforeach @endif
{{-- changes made to this layout as like we have to extend the line to the full column and remove the most recent line and also fetch 3 records the third one will be shown ther in the $latest block --}} {{--
CAMPUS LIFE AT UOR
@foreach ($studentLifePosts as $post)
{{ $post->title }}
{{ strtoupper($post->category->name ?? 'STUDENT LIFE') }} {{ $post->created_at->format('F d, Y') }}

{{ Str::limit($post->excerpt, 150) }}

@endforeach
MOST RECENT
{{ $latest->title }}
{{ $latest->category->name }} {{ $latest->published_at->format('F d, Y') }}

{{ $latest->excerpt }}...

--}}
CAMPUS LIFE AT UOR
@foreach ($studentLifePosts->take(2) as $post)
{{ $post->title }}
{{ strtoupper($post->category->name ?? 'STUDENT LIFE') }} {{ $post->created_at->format('F d, Y') }}

{{ Str::limit($post->excerpt, 150) }}

@endforeach
@if ($studentLifePosts->count() > 2) @php $latest = $studentLifePosts[2]; @endphp
{{ $latest->title }}
{{ $latest->category->name ?? '' }} {{ $latest->created_at->format('F d, Y') }}

{{ Str::limit($latest->excerpt, 180) }}

@endif
{{--

International Women's Day | IWD2025 | University of Rawalpindi

UOR Orientation'2024 | Welcoming UOR Pioneers | University of Rawalpindi

Freelance Data Scientist and Analyst | Botcamp | University of Rawalpindi

How Mentorship Changed Students at University of Rawalpindi | Global Horizons Session

--}} {{-- --}}
@if (count($latestVideos)) @endif
@foreach ($latestVideos as $video)

{{ $video['title'] }}

@endforeach
{{-- ARTICLE ARCHIVE --}} ALL
@include('front.latest-articles', ['latestArticles' => $latestArticles])
{{--
MUST READ
@if ($mustReadBlogs->isEmpty())

No Posts

No popular posts available

@else @foreach ($mustReadBlogs as $post)

{{ $post->category->name ?? 'Uncategorized' }}

{{ $post->title }}

{{ $post->published_at?->format('F d, Y') }}

@endforeach @endif
--}}
{{-- //this js is for scrolling purposes --}} {{-- --}} {{-- this js is for the ajax request in the latest articles --}} @endsection